Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 6 - Picture Shapes / Picture Shapes Reference
Functions / Editing Picture Parts


GXGetPictureParts

You can use the GXGetPictureParts function to obtain information about a specified subset of a picture's items.

long GXGetPictureParts(gxShape source, long index, long count,
                       gxShape shapes[], gxStyle styles[], 
                       gxInk inks[], gxTransform transforms[])
source
A reference to the picture shape whose items you want to examine.
index
The number of the first picture item you want to examine.
count
The total number of items you want to examine. You may supply the gxSelectToEnd constant (-1) to indicate that you want to examine all picture items (starting with the picture item indicated by the index parameter.)
shapes
An array of shape references. On return, this array contains references to the specified shapes contained in the source picture.
styles
An array of style references. On return, this array contains references to the overriding styles corresponding to the returned shapes.
inks
An array of ink references. On return, this array contains references to the overriding inks corresponding to the returned shapes.
transforms

An array of transform references. On return, this array contains references to the overriding transforms corresponding to the returned shapes.
function result
The total number of items returned.
DESCRIPTION
The GXGetPictureParts function extracts information from a subset of the picture items in the picture shape referenced by the source parameter. You specify which picture items using the index and count parameters. The index parameter, which must have a value of 1 or greater, indicates the first picture item you want to examine. The count parameter indicates how many items you want to examine.

You provide arrays to hold the returned information in the shapes, styles, inks, and transforms parameters. In the shapes array, the GXGetPictureParts function returns references to the shapes that correspond to the picture items you specified with the index and count parameters. In the styles, inks, and transforms arrays, this function returns references to the overriding styles, inks, and transforms for the specified picture items. You may provide nil for any of the array parameters to indicate that you do not want to obtain the corresponding references.

This function returns as its function result the number of picture items returned. Typically, this value is the same as the value you provide for the count parameter.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
shape_is_nil 
index_is_less_than_one(debugging version)
count_is_less_than_one(debugging version)
Warnings 
index_out_of_range  
count_out_of_range 
picture_expected(debugging version)
SEE ALSO
For information about picture items and their overriding styles, inks, and transforms, see "About Picture Shapes" beginning on page 6-3.

To examine all of the items in a picture geometry, use the GXGetPicture function, which is described on page 6-59.

To replace a subset of the items in a picture geometry, use the GXSetPictureParts function, which is described in the next section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help